#include <iostream>
#include <vector>
using namespace std;
int main(){
    vector<int> height_seq;
    for(int i = 0; i < 10; ++i) cin >> height_seq[i];
    int max_height; cin >> max_height;
    max_height += 30;
    int ret = 0;
    for(auto apple_height: height_seq){
        if(apple_height <= max_height) ret++;
    }
    return ret;
}